/*
 * functions.c
 *
 *  Created on: 2 kwi 2014
 *      Author: krzysiek
 */
#include <stdio.h>
#include <string.h>
#include "xxxgrep.h"
#define MAX 120

void find_string(char *str, FILE *f) {
	char tmp[MAX];

	while(fgets(tmp, MAX, f) != NULL) {
		if(strstr(tmp, str) != NULL)
			fputs(tmp, stdout);
	}
}

